package com.ltu.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
import org.springframework.web.socket.server.standard.ServletServerContainerFactoryBean;



/**
 *配置websocket
 */
@Configuration
public class WebSocketConfig    {

	@Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

	/**
	 * @Description: 设置webSocket 超时
	 * @author 李生
	 * @date 2024-11-04 03:21:48 
	 * @param registry
	 * @return
	 */
//	@Bean
//	public ServletServerContainerFactoryBean createWebSocketContainer() {
//		ServletServerContainerFactoryBean container = new ServletServerContainerFactoryBean();
//		container.setMaxTextMessageBufferSize(51200000);
//		container.setMaxBinaryMessageBufferSize(5120000);
//		container.setMaxSessionIdleTimeout(120l);
//		return container;
//	}

}





